﻿namespace SampleApplication.CoffeeShopSample.Dependencies.Domain
{
    #region Usings

    using Application;
    using Microsoft.Practices.ObjectBuilder2;
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;

    #endregion Usings

    public class MenuWriter : IMenuWriter
    {
        private readonly IOutputWriter outputWriter;

        private const string Separator = "------------------------------------";

        private static readonly IList<string> MenuItems =
            new[]
            {
                "Coffee Shop",
                string.Empty,
                Separator,
                string.Empty,
                "1. Order a coffee",
                "2. Order a Tea",
                "3. Exit",
                string.Empty,
                "Enter the number related to command action: "
            };

        public MenuWriter(IOutputWriter outputWriter)
        {
            this.outputWriter = outputWriter;
        }

        [ExcludeFromCodeCoverage]
        public void Write()
        {
            MenuItems.ForEach(outputWriter.WriteLine);
        }
    }
}